package com.web.core.base.model;

import com.blue.core.dict.State;
import com.blue.jdbc.annotation.Id;
import com.blue.jdbc.annotation.Table;
import com.blue.validation.group.SaveModel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Table(name = "base_config")
public class Config
{
	@Id
	private Integer id;
	@NotBlank(groups={SaveModel.class}, message="Key不能为空")
	@Size(min=0, max=50, groups={SaveModel.class}, message="Key长度值[0-50]")
	private String key;
	@NotBlank(groups={SaveModel.class}, message="Value不能为空")
	@Size(min=0, max=100, groups={SaveModel.class}, message="Value长度值[0-100]")
	private String value;
	@NotBlank(groups={SaveModel.class}, message="描述不能为空")
	@Size(min=0, max=200, groups={SaveModel.class}, message="描述长度值[0-200]")
	private String descp;
	private State state;

	public Config()
	{
	}

	public Integer getId()
	{
		return id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public String getKey()
	{
		return key;
	}

	public void setKey(String key)
	{
		this.key = key;
	}

	public String getValue()
	{
		return value;
	}

	public void setValue(String value)
	{
		this.value = value;
	}

	public String getDescp()
	{
		return descp;
	}

	public void setDescp(String descp)
	{
		this.descp = descp;
	}

	public State getState()
	{
		return state;
	}

	public void setState(State state)
	{
		this.state = state;
	}

}
